#pragma once
#include <iostream>
using namespace std;

/** This class represents a coordinate in a 2-d space, with a row and a column. */
class Coordinate
{
public:
	int row;
	int col;

	bool operator== (const Coordinate& other) const
	{
		return (row == other.row && col == other.col);
	}

	bool operator!= (const Coordinate& other) const
	{
		return (row != other.row || col != other.col);
	}

	Coordinate& operator= (const Coordinate& other)
	{
		if (this == &other)
			return *this;
		row = other.row;
		col = other.col;
		return *this;
	}

	Coordinate(): row(-1), col(-1) {}
	Coordinate(int r, int c): row(r), col(c) {}
	Coordinate(const Coordinate& other): row(other.row), col(other.col) {}
	friend ostream& operator<< (ostream& os, const Coordinate& coo)
	{
		cout << "(" << coo.row << "," << coo.col << ")";
		return os;
	}
};